using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for Utilities
/// </summary>
public class Utilities
{
    public Utilities()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public static string getCellValue(GridView sender, GridViewUpdateEventArgs e, int cellNo, int valueNo)
    {
        DataControlFieldCell cellPoolName = sender.Rows[e.RowIndex].Cells[cellNo] as DataControlFieldCell;

        sender.Columns[cellNo].ExtractValuesFromCell(
            e.NewValues,
            cellPoolName,
            DataControlRowState.Edit,
            true);

        if (e.NewValues[valueNo] == null)
            return "";
        else
            return e.NewValues[valueNo].ToString();
    }

    public static bool isInteger(string sTest)
    {
        try
        {
            Convert.ToInt32(sTest);
            return true;
        }
        catch
        {
            return false;
        }


    }


}
